The digitalization of information has resulted in a development of ways for storing and visualizing graphical information. The storing and visualization of graphical information i.e. images in a two dimensional space is based on two main types of graphical information, the first of which is called vector graphics and the second of which is called raster graphics (also known as bitmap).
The vector graphics is a type of computer graphics, which is based on an idea in which objects are tied into coordinates. The objects are for example lines, polygons, circles and other geometrical shapes. The characteristics and shapes of the objects are described as coordinates and mathematical expressions, such as mathematical formulas. For example, if a circle is to be created with vector graphics, an indication that a circle is to be created is needed, a location of the center of the circle in a coordinate system is defined as well as the radius of the circle. Additionally, the line style and a color and a fill style and a color are to be defined in the formula. By modifying the values in the formula the object can be re-shaped. Images based on the vector graphics are well-suited for showing ordered, exact and constructed items like text and diagrams. The images expressed with the means of vector graphics are called vector images.
In the raster graphics, in turn, the graphical information is expressed as a regular grid of colored points. More specifically, the raster image is composed from picture elements i.e. pixels, which are arranged in a grid structure, which is typically a rectangle. Each picture element has a predefined location in the grid and the color of the picture element is defined with color values. A raster image expressed as an array of data where each point occupies one array element is called an uncompressed raster image. The main benefit of this representation is that each point in the raster can be directly accessed by accessing the corresponding array element. The main drawback is that when that array is stored or transferred, the amount of raw data to be handled may be too much for the corresponding medium. The manipulation of the raster graphics image is possible in multiple ways, e.g. by adding or removing the picture elements to or from the image or optimizing the characteristics of the picture elements according to the needs. By means of the manipulation it is possible to affect the size of the image i.e. how much memory space is needed in storing the image data. Generally speaking, raster images are well-suited for showing disordered, approximate, and natural items like landscapes and physical objects typically originating from photos or scans.
Both image types are used in storing and visualizing of graphical information. The vast majority of modern display devices are so called raster displays that show a regular grid of colored points. Although the arrangement and shape of these points vary, the concepts of density and resolution that apply to raster images apply directly to raster display devices, too. Raster displays can display both vector and raster graphics, but the process required doing so is different. The process of displaying vector graphics on a raster display is called scan line conversion. It resolves where freeform vector graphic shapes intersect with raster display points arranged into straight lines, and what the color at each such intersection point is. The process of displaying raster graphics on a raster display is called raster resampling. It resolves which colors to apply on each raster display point by interpolating the colors between the colors at neighboring raster image points. An important resampling special case is when raster image and raster display resolution and point arrangement match perfectly. Resampling operation is then reduced to a simple copying operation.
In order to display any visual content on screens of computing devices, or to store it into a bitmap image file, the content goes thru scan line conversion (vector graphics) or raster resampling (raster graphics) steps, as disclosed above. These steps transform visual content so that they can be rasterized into the raster canvas having a certain pixel density (resolution). With the term ‘raster canvas’ it is meant a raster image kept and maintained in uncompressed form in a memory of a computing unit, such as a computer. The visual contents in the raster canvas can then be displayed on screen, or stored into a bitmap image file. When storing the data into some memory structure or a file, different data compression schemes may be applied to optimize the resulting bitmap image file size. There are various ways to compress bitmap data, and thus influence quality/size ratio of the resulting bitmap image file. It is often desirable to minimize the image file size, just to make it more affordable and practical to store, or to transmit to some remote device. The time it takes to transmit a file is dependent on the file size, and in slow network connections like mobile networks, this has direct impact on the overall user experience—how long the user needs to wait in order to see a certain image file.
A further aspect is that the modern outputting of graphical content is based, at least in some application areas, on layered visualization meaning that two or more content layers are superposed onto each other in a predetermined order so that the desired visual effect can be achieved. At least some of the layers are at least partially transparent in order to enable the visualization of content from the lower layers. In practice this means that several image content items are received, which are categorized under predetermined rules, such as based on the type of the image content item, into separate categories. The image content items in the categories are then rendered into raster canvases, which then form image content data in each of the categories. The image content data in each raster canvas may be compressed with applicable compression method resulting compressed image content data, which is stored in a data file, such as in a bitmap image file. The content data in the data file can be output in a layered manner by superposing the decompressed content data in each of the files belonging to the same visual output to be displayed.
A common example of the layered visualization is that text content is to be superposed on an image layer. One way to do this is to transform text objects into drawing instructions, and then further transform those drawing instructions into HTML content, and then position that HTML content on top of the image layer. A technique called web fonts can be used to force a certain downloadable font to be used when displaying HTML transformed text object. This approach has several shortcomings. For example, as the text objects are manipulated in a form of drawing instructions, which get transformed into HTML, any possible logical structure in the original text object is lost. In fact, a text object may be just one character, a word and half, or some mixture of characters belonging to different words, sentences and paragraphs. When all the text objects are displayed simultaneously, human reader sees them as full, meaningful phrases and sentences. For the computer displaying such layered construct these characters are meaningless, and due to the lack of structure, they cannot be processed or manipulated effectively as HTML content. Secondly, if such text objects are transformed to HTML without any optimization, the resulting text layer defined using HTML will have a lot of redundant information related to text formatting, thereby making it impractical to transfer or use in situations which deal with large volumes of text objects in same logical area, like a document page.
Another challenge with the existing methods arises from the fact that outputting the content data in a layered manner is more and more happening on a display of a client device, such as a personal computer or a mobile terminal. The development of the displays, e.g. high-resolution displays, as well as requirement of on-device zoomability of the content puts the requirements for content data manipulation on a totally new level.
Therefore, it is necessary to define an approach, which allows displaying content while relying on selective rasterization of content both on the server side and with the client device. In practice, as client devices, and the software applications residing in the client devices, may differ from each other, this approach may cause some content to be displayed in a different manner depending on the client device used.